DataSource for Entity Framework in WPF
C1.LiveLinq.AdoNet Namespace / IndexedDataTable<TRow> Class / BeginUpdate Method

In This Topic
    BeginUpdate Method (IndexedDataTable<TRow>)
    In This Topic
    Suspends notifications while massive changes are being made to a data table.
    Syntax
    'Declaration
     
    Public Sub BeginUpdate() 
    public void BeginUpdate()
    Remarks

    This method must be followed by EndUpdate.

    Use this method when you already have indexes built over a data table or live views based on that data table, and you need to re-populate it or perform other massive changes to rows of that data table. Without this method, every single change you make causes LiveLinq to perform necessary operations for maintaining your indexes and live views dependent on this data table. In case of massive changes, this can be slower than to wait until the massive changes are done and rebuild the indexes and live views.

    Between BeginUpdate and EndUpdate calls, indexes, live views, bound controls and other change notification listeners are not updated, they don't receive change notifications.

    When EndUpdate is called, a SourceChangeType.Modify or SourceChangeType.Reset notification is sent, depending on whether the change affected a single row or multiple rows of the data table. Even when you change a single row, it may make sense to enclose your changes in BeginUpdate/EndUpdate if you change multiple fields in the row. In that case a SourceChangeType.Modify notification is sent. If more than one row was changed, a SourceChangeType.Reset notification is sent, meaning all indexes, live views and other collections dependent on this data table must be rebuilt from scratch.

    See Also